<template>
  <view class="friend-wrap">
    <view class="search-box">
      <u-search shape="round" :showAction="false"></u-search>
    </view>
    <view class="tab-content">
      <u-tabs
        ref="tabs"
        :list="list"
        active-color="#2979ff"
        inactive-color="#606266"
        line-color="#D40000"
        font-size="30"
        :current="current"
        :activeStyle="activeStyle"
      ></u-tabs>
    </view>
    <view class="top-title">
      <view class="left-txt">合计邀请好友：32</view>
      <view>
        <text class="filter-txt">按时间筛选</text>
        <image src="/static/image/arrow_bg2.png" class="arrow-img"></image>
      </view>
    </view>
    <view class="friend-list">
      <view class="friend-item">
        <view class="top-content">
          <view class="left-box">
            <view class="avatar-box">
              <u-avatar
                src="https://img2.baidu.com/it/u=2934047998,2737647907&fm=253&app=138&f=JPEG?w=800&h=1518"
              ></u-avatar>
            </view>
            <view class="user-info">
              <view class="user-flag-box">
                <view class="user-name"> 黎欢 </view>
                <view class="flag-txt">推客</view>
              </view>
              <view class="user-id">ID：26231002</view>
            </view>
          </view>
          <view class="right-box">2025-10-25 加入</view>
        </view>
        <view class="bottom-content">
          <view class="left-txt2">订单笔数：16</view>
          <view class="right-txt2">佣金收益：¥108.00</view>
        </view>
      </view>
      <view class="friend-item">
        <view class="top-content">
          <view class="left-box">
            <view class="avatar-box">
              <u-avatar
                src="https://img2.baidu.com/it/u=2934047998,2737647907&fm=253&app=138&f=JPEG?w=800&h=1518"
              ></u-avatar>
            </view>
            <view class="user-info">
              <view class="user-flag-box">
                <view class="user-name"> 黎欢 </view>
                <view class="flag-txt">推客</view>
              </view>
              <view class="user-id">ID：26231002</view>
            </view>
          </view>
          <view class="right-box">2025-10-25 加入</view>
        </view>
        <view class="bottom-content">
          <view class="left-txt2">订单笔数：16</view>
          <view class="right-txt2">佣金收益：¥108.00</view>
        </view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {
      list: [
        {
          name: "好友",
        },
        {
          name: "达人",
        },
      ],
      current: 0,
      activeStyle: {
        color: "#333",
      },
    };
  },
  methods: {
    change(index) {
      this.current = index;
    },
  },
};
</script>
<style scope>
.u-tabs .u-tab.is-active {
  background-color: #ff0000 !important; /* 使用红色作为示例 */
  color: #ffffff !important;
}
.search-box {
  background: #fff;
  padding: 30rpx 20rpx 20rpx;
}
.tab-content {
  background: #fff;
}
::v-deep .u-tabs__wrapper__nav[data-v-48634e29] {
  display: flex;
  flex-direction: row;
  position: relative;
  justify-content: space-between;
}
::v-deep .u-tabs__wrapper__nav__item {
  flex: 1 1 0% !important;
}
.top-title {
  height: 100rpx;
  margin: 0 20rpx;
  display: flex;
  justify-content: space-between;
  line-height: 100rpx;
}
.left-txt {
  font-size: 28rpx;
  color: #333;
}
.filter-txt {
  font-size: 26rpx;
  color: #999;
}
.arrow-img {
  width: 24rpx;
  height: 24rpx;
}
.friend-list {
  margin: 20rpx;
}
.friend-item {
  height: 230rpx;
  background: #fff;
  border-radius: 10rpx;
  padding: 0 20rpx;
  margin-bottom: 20rpx;
}
.top-content {
  padding: 30rpx 0;
  display: flex;
  justify-content: space-between;
}
.bottom-content {
  display: flex;
  justify-content: space-between;
  width: 674rpx;
  height: 70rpx;
  background: #fff5f5;
  border-radius: 10rpx;
  /* line-height: 70rpx; */
  font-size: 26rpx;
  color: #333;
}
.left-txt2,
.right-txt2 {
  flex: 1;
  text-align: center;
  height: 40rpx;
  margin: auto;
}
.left-txt2 {
  border-right: 1rpx solid #ccc;
}
.flag-txt {
  width: 60rpx;
  height: 32rpx;
  background: #ffeded;
  border: 1rpx solid #ffcccc;
  color: #d40000;
  font-size: 20rpx;
  text-align: center;
  line-height: 30rpx;
  box-sizing: border-box;
  border-radius: 6rpx;
  margin-left: 20rpx;
  vertical-align: middle;
  margin-top: 10rpx;
}
.left-box,
.user-flag-box {
  display: flex;
  justify-content: start;
}
.user-name {
  font-size: 32rpx;
  color: #2d2d2d;
}
.avatar-box {
  margin-right: 20rpx;
}
.user-id {
  color: #666;
  font-size: 24rpx;
}
.right-box {
  font-size: 24rpx;
  color: #999;
}
</style>